<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <meta http-equiv="X-UA-Compatible" content="ie=edge" />
  <title>js通用方法库</title>
</head>

<body>
  <!-- 测试 -->
  <button onclick="copy()">复制</button>
  <button onclick="download()">下载</button>
  <div class="excerpt"></div>
  <script>
    window.onload = function () {
      function copy() {
        copyToClipboard("1111")
      }

      function download() {
        createAndDownloadFile("file", "doc", "kjl;ihpion")
      }

      document.querySelector(".excerpt").innerHTML = excerpt("js通用方法库", 3)
    }



  </script>
  <script src="./utils.js"></script>
</body>

</html>